<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta http-equiv="X-UA-Compatible" content="IE=7">
    <!-- iphone safari -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">  
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no"/>
    <meta name="apple-mobile-web-app-capable" content="yes" /> 
    <meta name="apple-mobile-web-app-status-bar-style" content="black" />       
    <meta content="black" name="apple-mobile-web-app-status-bar-style" />  
    <meta content="telephone=no" name="format-detection" /> 

    <!--[if lt IE 8]>
    <link type="text/css" rel="stylesheet" href="<?php echo Yii::app()->clientScript->minScriptCreateGroup(array(Yii::app()->request->baseUrl.'/css/ie.css')); ?>" />
    <![endif]-->
    <!--[if lt IE 9]>
    <script type="text/javascript" src="<?php echo Yii::app()->clientScript->minScriptCreateGroup(array(Yii::app()->request->baseUrl.'/js/css3-mediaqueries.js')); ?>"></script>
　　<![endif]--> 
    <?php 
    Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/screen-min.css' , "screen" );
    Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/fresh.css' , "screen" );
    Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/fresh-mobile.css' , "screen and (max-width:799px) and (min-width:461px)" );
    Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/fresh-mobile-320.css' , "screen and (max-width:460px)" );
    Yii::app()->clientScript->registerCssFile(Yii::app()->baseUrl . '/css/carousel.css' , "screen" );
    Yii::app()->clientScript->registerScriptFile(Yii::app()->baseUrl . '/js/swipe.js' );
    ?>
<title>欢迎来到<?php echo $company->title;?></title>
</head> 
<body> 
<div class="container" id="page"> 
    <div id="header">
        <div id="logo"><img src="<?php echo Yii::app()->request->baseUrl.$company->logo ?>" /></div>
    </div><!-- header -->  

    <div class="span-11"> 
        <div id='slider' class='swipe mobiles'>
          <div class='swipe-wrap'>
            <?php 
                foreach ($xdvert as $key) {
                    echo "<div><img src='".Yii::app()->request->baseUrl.$key->picture."'></div>\n";
                }
            ?> 
          </div>
        </div>

        <nav id='mobiles_nav'>
        <ul id='position'>
            <li class="on"></li>
            <?php 
                $i=1;
                while($i<count($xdvert))
                {
                    echo "<li></li>\n";
                    $i++;
                }
            ?>
        </ul>
        </nav> 
        <div id="feig"></div> 
        <?php if (count($xdvert) > 0) { ?> 
        <div id="newsview">
            <div id="title">推荐视频<span id="more"><a href="<?php echo Yii::app()->createUrl('api/moreGraphic&cid='.$company->id.'&type=2&view=2');?>"><img src="<?php echo Yii::app()->request->baseUrl.'/images/web/gd.png';?>"></a></span></div>
            <div id="cents">
                <ul id="centsul">
                <?php  foreach ($xdvert_video as $key => $value) {?>
                    <div id="articleinfo" <?php if($key ==1 || $key==2){echo "class='margleft'";}?>><a href="<?php echo Yii::app()->createUrl('api/moreView&cid='.$company->id.'&vid='.$value->id.'&view=2');?>"><img src="<?php echo Yii::app()->request->baseUrl.$value->thumbnails;?>" /></a><?php echo $value->title;?></div> 
                <?php } ?>  
                 </ul>
            </div>
        </div>
        <?php } ?>
        <div style="clear: both" class="mobiles"></div>
    </div>

    <div class="span-9 last">
        <div id="content">  
                <div id='login'><input type="button" name="yt0" value="开启免费无线上网" onclick='window.location.href="<?php echo Yii::app()->createUrl('api/login_form');?>"' /> 
                    <div id="feig"></div> 
                </div> 
               
                <div id="compayinfo">
                    <div id="title"><?php echo $company->title?>简介</div>
                    <div id="info">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<?php echo $company->description;?></div>
                    <div id="info">电话:<?php echo $company->tel;?></div>
                    <div id="info">地址:<?php echo $company->address;?></div>
                </div> 
                 <div style="clear: both"></div>
        </div><!-- content -->
    </div>  

    <div class="clear"></div> 
    <div id="footer">
         Copyright &copy; All Rights Reserved (2008-<?php echo date('Y')?>) <br>版权所有 复制必究 <br/> 
    </div><!-- footer -->

</div><!-- page -->
<script type="text/javascript"> 
    var slider = Swipe(document.getElementById('slider'), {
        auto: 3000,
        continuous: true, 
        callback: function(pos) {   
            var i = bullets.length;
            if(pos>=i){
                pos = pos-i;
            }
            while (i--) {
                bullets[i].className = ' ';
            } 
            bullets[pos].className = 'on';
        }
    }); 
    var bullets = document.getElementById('position').getElementsByTagName('li');
</script>
</body>
</html>
